import {Login} from "./models/login";

App({
    onLaunch() {

    },

    globalData: {
        userInfo: null
    },

    onLogin() {
        wx.login({
            success: async res => {
                const {nickName, avatarUrl} = wx.getStorageSync('userInfo')
                await Login.onLogin(res.code, nickName, avatarUrl)
            }
        })
    }
})
